<%-- 
    Document   : Header
    Created on : Mar 1, 2011, 9:34:21 PM
    Author     : trietto
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <body>
        <table align="center" border="0">
            <tr>
                <td colspan="5" align="center">
                    <h1>ONLINE BOOKSTORE</h1><br>
                </td>
            </tr>
            <tr>
                <td>
                    <c:if test="${!empty sessionScope.user}" >
                        <jsp:useBean id="user" type="models.Member" scope="session" />
                        <jsp:setProperty name="user" property="*" />
                        <c:out value="Hello ${user.memberLogin}" />
                    </c:if>
                </td>
                <td>
                    <a href="Default.jsp">Home</a>
                </td>
                <td>
                    <a href="Registration.jsp">Registration</a>
                </td>
                <td>
                    <a href="ShoppingCart.jsp">Shopping Cart</a>
                </td>
                <td>
                    <c:if test="${!empty sessionScope.user}" >
                        <a href="LoginServlet?action=logout">Sign out</a>
                    </c:if>
                    <c:if test="${empty sessionScope.user}" >
                        <a href="Login.jsp">Sign In</a>
                    </c:if>

                </td>
                <td>
                    <a href="Admin/AdminHome.jsp">Administration</a>
                </td>
            </tr>
        </table>
        <br>
    </body>
</html>
